﻿namespace Borg.Framework
{
    public static class PlugAndSelectExtensionAction
    {
        public static void PlugAndSelectExtension(SlotInfo slot, int registeredPlugIndex)
        {
            var plug = slot.RegisteredPlugTypeInfos[registeredPlugIndex].CreateExtension(slot);
            plug.Plug(slot);
            slot.SelectedPlug = plug;
        }
    }
}

